# Support ATE function
HAS_ATE=y

# Support ATE NEW TXCONT solution
HAS_NEW_TXCONT=n

# Support QA ATE function
HAS_QA_SUPPORT=y

#ifdef RSSI_FEEDBACK
HAS_RSSI_FEEDBACK=n
#endif // RSSI_FEEDBACK //

#ifdef XLINK_SUPPORT
# Support XLINK mode
HAS_XLINK=n
#endif // XLINK_SUPPORT //

#ifdef WSC_INCLUDED
# Support WSC function
HAS_WSC=y
#ifdef WSC_V2_SUPPORT
HAS_WSC_V2=y
#endif // WSC_V2_SUPPORT //
HAS_WSC_LED=y
#endif // WSC_INCLUDED //

#ifdef NINTENDO_AP
HAS_NINTENDO=n
#endif // NINTENDO_AP //

# Support LLTD function
HAS_LLTD=n

#ifdef WDS_SUPPORT
# Support WDS function
HAS_WDS=y
#endif // WDS_SUPPORT //

#ifdef APCLI_SUPPORT
# Support AP-Client function
HAS_APCLI=y
#endif // APCLI_SUPPORT //

#ifdef WPA_SUPPLICANT_SUPPORT
# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=n
#endif // WPA_SUPPLICANT_SUPPORT //

#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
# Support Native WpaSupplicant for Network Maganger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //

#Support Net interface block while Tx-Sw queue full
HAS_BLOCK_NET_IF=n

#Support IGMP-Snooping function.
HAS_IGMP_SNOOP_SUPPORT=y

#Support DFS function
HAS_DFS_SUPPORT=n

#Support Carrier-Sense function
HAS_CS_SUPPORT=n

#ifdef ETH_CONVERT_SUPPORT
# Support for STA Ethernet Converter
HAS_ETH_CONVERT_SUPPORT=n
#endif // ETH_CONVERT_SUPPORT //

# Support user specific transmit rate of Multicast packet.
HAS_MCAST_RATE_SPECIFIC_SUPPORT=n

#ifdef WMM_ACM_SUPPORT
# Support for WMM ACM v1.1
HAS_WMM_ACM_SUPPORT=n
#endif // WMM_ACM_SUPPORT //

#Support for IEEE802.11e DLS
HAS_QOS_DLS_SUPPORT=n

#Support for EXT_CHANNEL
HAS_EXT_BUILD_CHANNEL_LIST=n

#Support for IDS 
HAS_IDS_SUPPORT=n

#ifdef MESH_SUPPORT
#Support for MESH
HAS_MESH_SUPPORT=n
#endif // MESH_SUPPORT //

#Support for Net-SNMP
HAS_SNMP_SUPPORT=n

#ifdef DOT11N_DRAFT3
#Support features of 802.11n Draft3
HAS_DOT11N_DRAFT3_SUPPORT=y
#endif // DOT11N_DRAFT3 //

#Support features of Single SKU. 
HAS_SINGLE_SKU_SUPPORT=n

#ifdef DOT11_N_SUPPORT
#Support features of 802.11n
HAS_DOT11_N_SUPPORT=y
#endif // DOT11_N_SUPPORT //

#ifdef WAPI_SUPPORT
#Support for WAPI
HAS_WAPI_SUPPORT=n
#endif // WAPI_SUPPORT //

#ifdef DOT11R_FT_SUPPORT
#Support for dot11r FT
HAS_DOT11R_FT_SUPPORT=n
#endif // DOT11R_FT_SUPPORT //

#ifdef RT2860
#Support for 2860/2880 co-exist 
HAS_RT2880_RT2860_COEXIST=n
#endif // RT2860 //

HAS_KTHREAD_SUPPORT=n

#ifdef DOT11K_RRM_SUPPORT
#Support for dot11k RRM
HAS_DOT11K_RRM_SUPPORT=n
#endif // DOT11K_RRM_SUPPORT //

#ifdef DOT11V_WNM_SUPPORT
#Support for dot 11v WNM
HAS_DOT11V_WNM_SUPPORT=n
#endif // DOT11V_WNM_SUPPORT //

#ifdef DOT11Z_TDLS_SUPPORT
#Support for dot11z TDLS
HAS_DOT11Z_TDLS_SUPPORT=n
#endif // DOT11Z_TDLS_SUPPORT //

#Support for Auto channel select enhance
HAS_AUTO_CH_SELECT_ENHANCE=n

#Support statistics count
HAS_STATS_COUNT=y

#ifdef DOT11W_PMF_SUPPORT
#Support for dot11w Protected Management Frame
HAS_DOT11W_PMF_SUPPORT=n
#endif // DOT11W_PMF_SUPPORT //

#ifdef ANT_DIVERSITY_SUPPORT
#Support Antenna Diversity
HAS_ANTENNA_DIVERSITY_SUPPORT=n
#endif // ANT_DIVERSITY_SUPPORT //

#Client support WDS function
HAS_CLIENT_WDS_SUPPORT=n

#Support for Bridge Fast Path & Bridge Fast Path function open to other module
HAS_BGFP_SUPPORT=n
HAS_BGFP_OPEN_SUPPORT=n

#ifdef LINUX
# Support HOSTAPD function
HAS_HOSTAPD_SUPPORT=n
#endif // LINUX //

#ifdef CONFIG_AP_SUPPORT
#Support GreenAP function
HAS_GREENAP_SUPPORT=n
#endif // CONFIG_AP_SUPPORT //

#ifdef EASY_CONFIG_SETUP
HAS_EASY_CONFIG_SETUP_SUPPORT=n
#endif // EASY_CONFIG_SETUP //

#ifdef RELEASE_EXCLUDE
#Support GPL Cryptography
HAS_GPL_ALGORITHM_SUPPORT=n

#ifdef HW_COEXISTENCE_SUPPORT
HAS_HW_COEXISTENCE_SUPPORT=n
#endif // HW_COEXISTENCE_SUPPORT //

#ifdef BT_COEXISTENCE_SUPPORT
HAS_BT_COEXISTENCE_SUPPORT=n
#endif // BT_COEXISTENCE_SUPPORT //
#endif //RELEASE_EXCLUDE //

HAS_RTMP_FLASH_SUPPORT=n

#ifdef LED_CONTROL_SUPPORT
HAS_LED_CONTROL_SUPPORT=y
#endif // LED_CONTROL_SUPPORT //

#ifdef CONFIG_WIFI_LED_SHARE 
HAS_WIFI_LED_SHARE=n
#endif // CONFIG_WIFI_LED_SHARE //

# Trigger the WPS & Restore button of platform
HAS_PLATFORM_BUTTON_SUPPORT=y

#################################################

WFLAGS := -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT -Wall -Wstrict-prototypes -Wno-trigraphs 
WFLAGS += -DWLAN_LED -DSYSTEM_LOG_SUPPORT

#ifdef RELEASE_EXCLUDE
ifeq ($(HAS_GPL_ALGORITHM_SUPPORT),y)
WFLAGS += -DCRYPT_GPL_ALGORITHM
endif
#endif // RELEASE_EXCLUDE //


ifeq ($(HAS_KTHREAD_SUPPORT),y)
WFLAGS += -DKTHREAD_SUPPORT
endif

ifeq ($(HAS_RTMP_FLASH_SUPPORT),y)
WFLAGS += -DRTMP_FLASH_SUPPORT
endif

#ifdef CONFIG_AP_SUPPORT
# config for AP mode

ifeq ($(RT28xx_MODE),AP)
WFLAGS += -DCONFIG_AP_SUPPORT  -DUAPSD_SUPPORT -DMBSS_SUPPORT -DIAPP_SUPPORT -DDBG -DDOT1X_SUPPORT -DAP_SCAN_SUPPORT

#ifdef LINUX
ifeq ($(HAS_HOSTAPD_SUPPORT),y)
WFLAGS += -DHOSTAPD_SUPPORT
endif
#endif // LINUX //

ifeq ($(HAS_ATE),y)
WFLAGS += -DCONFIG_ATE
WFLAGS += -DCONFIG_RT2880_ATE_CMD_NEW
ifeq ($(HAS_NEW_TXCONT),y)
WFLAGS += -DNEW_TXCONT
endif
ifeq ($(HAS_QA_SUPPORT),y)
WFLAGS += -DCONFIG_QA
endif
endif

#ifdef RSSI_FEEDBACK
ifeq ($(HAS_RSSI_FEEDBACK),y)
WFLAGS += -DRSSI_FEEDBACK
endif
#endif // RSSI_FEEDBACK //

#ifdef GEMTEK_ATE
ifeq ($(RELEASE), DPB)
WFLAGS += -DGEMTEK_ATE
endif
#endif // GEMTEK_ATE //


#ifdef NINTENDO_AP
ifeq ($(HAS_NINTENDO),y)
WFLAGS += -DNINTENDO_AP
endif
#endif // NINTENDO_AP //

#ifdef WSC_INCLUDED
ifeq ($(HAS_WSC),y)
WFLAGS += -DWSC_AP_SUPPORT
#ifdef WSC_V2_SUPPORT
ifeq ($(HAS_WSC_V2),y)
WFLAGS += -DWSC_V2_SUPPORT
endif
#endif // WSC_V2_SUPPORT //
ifeq ($(HAS_WSC_LED),y)
WFLAGS += -DWSC_LED_SUPPORT
endif
endif
#endif // WSC_INCLUDED //

#ifdef EASY_CONFIG_SETUP
ifeq ($(HAS_EASY_CONFIG_SETUP_SUPPORT),y)
WFLAGS += -DEASY_CONFIG_SETUP
endif
#endif // EASY_CONFIG_SETUP //

#ifdef WDS_SUPPORT
ifeq ($(HAS_WDS),y)
WFLAGS += -DWDS_SUPPORT
endif
#endif // WDS_SUPPORT //

#ifdef APCLI_SUPPORT
ifeq ($(HAS_APCLI),y)
WFLAGS += -DAPCLI_SUPPORT -DMAT_SUPPORT -DAP_SCAN_SUPPORT
#ifeq ($(HAS_ETH_CONVERT_SUPPORT), y)
#WFLAGS += -DETH_CONVERT_SUPPORT
#endif 
endif
#endif // APCLI_SUPPORT //

ifeq ($(HAS_IGMP_SNOOP_SUPPORT),y)
WFLAGS += -DIGMP_SNOOP_SUPPORT
endif

ifeq ($(HAS_CS_SUPPORT),y)
WFLAGS += -DCARRIER_DETECTION_SUPPORT
endif

ifeq ($(HAS_MCAST_RATE_SPECIFIC_SUPPORT), y)
WFLAGS += -DMCAST_RATE_SPECIFIC
endif

#ifdef RT2860
ifeq ($(CHIPSET),2860)
ifeq ($(HAS_MSI_SUPPORT),y)
WFLAGS += -DPCI_MSI_SUPPORT
endif
endif
#endif // RT2860 //

#ifdef WMM_ACM_SUPPORT
ifeq ($(HAS_WMM_ACM_SUPPORT),y)
WFLAGS += -DWMM_ACM_SUPPORT
endif
#endif // WMM_ACM_SUPPORT //

ifeq ($(HAS_QOS_DLS_SUPPORT),y)
WFLAGS += -DQOS_DLS_SUPPORT
endif

ifeq ($(HAS_SNMP_SUPPORT),y)
WFLAGS += -DSNMP_SUPPORT
endif


ifeq ($(HAS_SINGLE_SKU_SUPPORT),y)
WFLAGS += -DSINGLE_SKU
endif

#ifdef DOT11_N_SUPPORT
ifeq ($(HAS_DOT11_N_SUPPORT),y)
WFLAGS += -DDOT11_N_SUPPORT -DBW_FALLBACK_SUPPORT
#ifdef DOT11N_DRAFT3
ifeq ($(HAS_DOT11N_DRAFT3_SUPPORT),y)
WFLAGS += -DDOT11N_DRAFT3
endif
#endif // DOT11N_DRAFT3 //
endif
ifeq ($(HAS_GREENAP_SUPPORT),y)
WFLAGS += -DGREENAP_SUPPORT
endif
#endif // DOT11_N_SUPPORT //

ifeq ($(HAS_AUTO_CH_SELECT_ENHANCE),y)
WFLAGS += -DAUTO_CH_SELECT_ENHANCE
endif

ifeq ($(HAS_STATS_COUNT),y)
WFLAGS += -DSTATS_COUNT_SUPPORT
endif

#ifdef ANT_DIVERSITY_SUPPORT
ifeq ($(HAS_ANTENNA_DIVERSITY_SUPPORT),y)
WFLAGS += -DANT_DIVERSITY_SUPPORT
endif
#endif // ANT_DIVERSITY_SUPPORT //

#ifdef RELEASE_EXCLUDE
#ifdef HW_COEXISTENCE_SUPPORT
ifeq ($(HAS_HW_COEXISTENCE_SUPPORT),y)
WFLAGS += -DHW_COEXISTENCE_SUPPORT
endif
#endif // HW_COEXISTENCE_SUPPORT //
#endif //RELEASE_EXCLUDE //

endif #// endif of RT2860_MODE == AP //
#endif // CONFIG_AP_SUPPORT //

#################################################

#ifdef CONFIG_STA_SUPPORT
# config for STA mode

ifeq ($(RT28xx_MODE),STA)
WFLAGS += -DCONFIG_STA_SUPPORT -DDBG

#ifdef XLINK_SUPPORT
ifeq ($(HAS_XLINK),y)
WFLAGS += -DXLINK_SUPPORT
endif
#endif // XLINK_SUPPORT //

#ifdef ADHOC_WPA2PSK_SUPPORT
WFLAGS += -DADHOC_WPA2PSK_SUPPORT
#endif // ADHOC_WPA2PSK_SUPPORT //

#ifdef WPA_SUPPLICANT_SUPPORT
ifeq ($(HAS_WPA_SUPPLICANT),y)
WFLAGS += -DWPA_SUPPLICANT_SUPPORT
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y)
WFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT
endif
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
endif
#endif // WPA_SUPPLICANT_SUPPORT //

#ifdef WSC_INCLUDED
ifeq ($(HAS_WSC),y)
WFLAGS += -DWSC_STA_SUPPORT
ifeq ($(HAS_WSC_LED),y)
WFLAGS += -DWSC_LED_SUPPORT
endif
endif
#endif // WSC_INCLUDED //

#ifdef STA_EASY_CONFIG_SETUP
ifeq ($(HAS_WSC),y)
ifeq ($(HAS_EASY_CONFIG_SETUP_SUPPORT),y)
WFLAGS += -DEASY_CONFIG_SETUP -DSTA_EASY_CONFIG_SETUP
endif
endif
#endif // STA_EASY_CONFIG_SETUP //

#ifdef ETH_CONVERT_SUPPORT
ifeq ($(HAS_ETH_CONVERT_SUPPORT), y)
WFLAGS += -DETH_CONVERT_SUPPORT  -DMAT_SUPPORT
endif
#endif // ETH_CONVERT_SUPPORT //

ifeq ($(HAS_ATE),y)
WFLAGS += -DCONFIG_ATE
WFLAGS += -DCONFIG_RT2880_ATE_CMD_NEW
ifeq ($(HAS_NEW_TXCONT),y)
WFLAGS += -DNEW_TXCONT
endif
ifeq ($(HAS_QA_SUPPORT),y)
WFLAGS += -DCONFIG_QA
endif
endif

#ifdef WMM_ACM_SUPPORT
ifeq ($(HAS_WMM_ACM_SUPPORT),y)
WFLAGS += -DWMM_ACM_SUPPORT
endif
#endif // WMM_ACM_SUPPORT //

ifeq ($(HAS_SNMP_SUPPORT),y)
WFLAGS += -DSNMP_SUPPORT
endif

ifeq ($(HAS_QOS_DLS_SUPPORT),y)
WFLAGS += -DQOS_DLS_SUPPORT
endif

#ifdef DOT11_N_SUPPORT
ifeq ($(HAS_DOT11_N_SUPPORT),y)
WFLAGS += -DDOT11_N_SUPPORT
#ifdef DOT11N_DRAFT3
ifeq ($(HAS_DOT11N_DRAFT3_SUPPORT),y)
WFLAGS += -DDOT11N_DRAFT3
endif
#endif // DOT11N_DRAFT3 //
endif
#endif // DOT11_N_SUPPORT //

#ifdef DOT11Z_TDLS_SUPPORT
ifeq ($(HAS_DOT11Z_TDLS_SUPPORT),y)
WFLAGS += -DDOT11Z_TDLS_SUPPORT
endif
#endif // DOT11Z_TDLS_SUPPORT //

ifeq ($(HAS_CS_SUPPORT),y)
WFLAGS += -DCARRIER_DETECTION_SUPPORT
endif

ifeq ($(HAS_STATS_COUNT),y)
WFLAGS += -DSTATS_COUNT_SUPPORT
endif

#ifdef RTMP_USB_SUPPORT
ifeq ($(HAS_USB_SUPPORT_SELECTIVE_SUSPEND),y)
WFLAGS += -DUSB_SUPPORT_SELECTIVE_SUSPEND -DCONFIG_PM
endif
#endif // RTMP_USB_SUPPORT //

ifeq ($(OSABL),YES)
WFLAGS += -DOS_ABL_SUPPORT
endif

#ifdef ANT_DIVERSITY_SUPPORT
ifeq ($(HAS_ANTENNA_DIVERSITY_SUPPORT),y)
WFLAGS += -DANT_DIVERSITY_SUPPORT
endif
#endif // ANT_DIVERSITY_SUPPORT //

#ifdef RELEASE_EXCLUDE
#ifdef HW_COEXISTENCE_SUPPORT
ifeq ($(HAS_HW_COEXISTENCE_SUPPORT),y)
WFLAGS += -DHW_COEXISTENCE_SUPPORT
endif
#endif // HW_COEXISTENCE_SUPPORT //

#ifdef BT_COEXISTENCE_SUPPORT
ifeq ($(HAS_BT_COEXISTENCE_SUPPORT),y)
WFLAGS += -DHW_COEXISTENCE_SUPPORT -DBT_COEXISTENCE_SUPPORT
endif
#endif // BT_COEXISTENCE_SUPPORT //
#endif //RELEASE_EXCLUDE //

endif
# endif of ifeq ($(RT28xx_MODE),STA)
#endif // CONFIG_STA_SUPPORT //

#################################################

#ifdef CONFIG_APSTA_SUPPORT
# config for APSTA

ifeq ($(RT28xx_MODE),APSTA)
WFLAGS += -DCONFIG_AP_SUPPORT -DCONFIG_STA_SUPPORT -DCONFIG_APSTA_MIXED_SUPPORT -DUAPSD_SUPPORT -DMBSS_SUPPORT -DIAPP_SUPPORT -DAP_SCAN_SUPPORT -DDBG

#ifdef NINTENDO_AP
ifeq ($(HAS_NINTENDO),y)
WFLAGS += -DNINTENDO_AP
endif
#endif // NINTENDO_AP //

#ifdef WSC_INCLUDED
ifeq ($(HAS_WSC),y)
WFLAGS += -DWSC_AP_SUPPORT -DWSC_STA_SUPPORT
endif
#endif // WSC_INCLUDED //

#ifdef WDS_SUPPORT
ifeq ($(HAS_WDS),y)
WFLAGS += -DWDS_SUPPORT
endif
#endif // WDS_SUPPORT //

#ifdef APCLI_SUPPORT
ifeq ($(HAS_APCLI),y)
WFLAGS += -DAPCLI_SUPPORT -DMAT_SUPPORT
endif
#endif // APCLI_SUPPORT //

ifeq ($(HAS_IGMP_SNOOP_SUPPORT),y)
WFLAGS += -DIGMP_SNOOP_SUPPORT
endif

ifeq ($(HAS_CS_SUPPORT),y)
WFLAGS += -DCARRIER_DETECTION_SUPPORT
endif

ifeq ($(HAS_MCAST_RATE_SPECIFIC_SUPPORT), y)
WFLAGS += -DMCAST_RATE_SPECIFIC
endif

ifeq ($(HAS_QOS_DLS_SUPPORT),y)
WFLAGS += -DQOS_DLS_SUPPORT
endif

#ifdef WPA_SUPPLICANT_SUPPORT
ifeq ($(HAS_WPA_SUPPLICANT),y)
WFLAGS += -DWPA_SUPPLICANT_SUPPORT
#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y)
WFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT
endif
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
endif
#endif // WPA_SUPPLICANT_SUPPORT //

#ifdef ETH_CONVERT_SUPPORT
ifeq ($(HAS_ETH_CONVERT_SUPPORT), y)
WFLAGS += -DETH_CONVERT_SUPPORT  -DMAT_SUPPORT
endif
#endif // ETH_CONVERT_SUPPORT //

#ifdef DOT11_N_SUPPORT
ifeq ($(HAS_DOT11_N_SUPPORT),y)
WFLAGS += -DDOT11_N_SUPPORT
endif
#endif // DOT11_N_SUPPORT //

ifeq ($(HAS_CS_SUPPORT),y)
WFLAGS += -DCARRIER_DETECTION_SUPPORT
endif

ifeq ($(HAS_STATS_COUNT),y)
WFLAGS += -DSTATS_COUNT_SUPPORT
endif

ifeq ($(HAS_CRDA_SUPPORT),y)
WFLAGS += -DCRDA_SUPPORT
endif

ifeq ($(OSABL),YES)
WFLAGS += -DOS_ABL_SUPPORT
endif

endif
# endif of ifeq ($(RT28xx_MODE),APSTA)
#endif // CONFIG_APSTA_SUPPORT //
#################################################

#
# Common compiler flag
#

#ifdef RELEASE_EXCLUDE
#Remove internal debug code when offical release 
WFLAGS += -DRELEASE_EXCLUDE
#endif // RELEASE_EXCLUDE //

#ifdef MESH_SUPPORT
ifeq ($(HAS_MESH_SUPPORT),y)
WFLAGS += -DMESH_SUPPORT -DINTEL_CMPC -DAP_SCAN_SUPPORT
endif
#endif // MESH_SUPPORT //

#ifdef DOT11R_FT_SUPPORT
ifeq ($(HAS_DOT11R_FT_SUPPORT),y)
WFLAGS += -DDOT11R_FT_SUPPORT
endif
#endif // DOT11R_FT_SUPPORT //

#ifdef DOT11K_RRM_SUPPORT
ifeq ($(HAS_DOT11K_RRM_SUPPORT),y)
WFLAGS += -DDOT11K_RRM_SUPPORT -DAP_SCAN_SUPPORT
endif
#endif // DOT11K_RRM_SUPPORT //

#ifdef DOT11V_WNM_SUPPORT
ifeq ($(HAS_DOT11V_WNM_SUPPORT),y)
WFLAGS += -DDOT11V_WNM_SUPPORT
endif
#endif // DOT11V_WNM_SUPPORT //

ifeq ($(HAS_EXT_BUILD_CHANNEL_LIST),y)
WFLAGS += -DEXT_BUILD_CHANNEL_LIST
endif

ifeq ($(HAS_IDS_SUPPORT),y)
WFLAGS += -DIDS_SUPPORT
endif

#ifdef WAPI_SUPPORT
ifeq ($(HAS_WAPI_SUPPORT),y)
WFLAGS += -DWAPI_SUPPORT -DSOFT_ENCRYPT -DEXPORT_SYMTAB
endif
#endif // WAPI_SUPPORT //

ifeq ($(HAS_CLIENT_WDS_SUPPORT),y)
WFLAGS += -DCLIENT_WDS
endif

ifeq ($(HAS_BGFP_SUPPORT),y)
WFLAGS += -DBG_FT_SUPPORT
endif

ifeq ($(HAS_BGFP_OPEN_SUPPORT),y)
WFLAGS += -DBG_FT_OPEN_SUPPORT
endif

#ifdef DOT11W_PMF_SUPPORT
ifeq ($(HAS_DOT11W_PMF_SUPPORT),y)
WFLAGS += -DDOT11W_PMF_SUPPORT -DSOFT_ENCRYPT
endif
#endif // DOT11W_PMF_SUPPORT //

#ifdef LED_CONTROL_SUPPORT
ifeq ($(HAS_LED_CONTROL_SUPPORT),y)
WFLAGS += -DLED_CONTROL_SUPPORT
endif
#endif // LED_CONTROL_SUPPORT //

ifeq ($(HAS_PLATFORM_BUTTON_SUPPORT),y)
WFLAGS += -DPLATFORM_BUTTON_SUPPORT
endif

#################################################
# ChipSet specific definitions.
#
#ifdef RT2860
ifeq ($(CHIPSET),2860)
WFLAGS +=-DRTMP_MAC_PCI -DRTMP_PCI_SUPPORT -DRT2860 -DRT28xx
endif
#endif  // RT2860 //

#ifdef RT3090
ifeq ($(CHIPSET),3090)
WFLAGS +=-DRTMP_MAC_PCI -DRT30xx -DRT3090  -DRTMP_PCI_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT -DSPECIFIC_VCORECAL_SUPPORT
CHIPSET_DAT = 2860
endif
#endif  // RT3090 //

#ifdef RT2870
ifeq ($(CHIPSET),2870)
WFLAGS +=-DRTMP_MAC_USB -DRTMP_USB_SUPPORT -DRT2870 -DRT28xx -DRTMP_TIMER_TASK_SUPPORT -DA_BAND_SUPPORT
CHIPSET_DAT = 2870
ifeq ($(HAS_DFS_SUPPORT),y)
WFLAGS += -DDFS_SOFTWARE_SUPPORT
endif
endif
#endif  // RT2870 //

#ifdef RT2070
ifeq ($(CHIPSET),2070)
WFLAGS +=-DRTMP_MAC_USB -DRT30xx -DRT3070 -DRT2070 -DRTMP_USB_SUPPORT -DRTMP_TIMER_TASK_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT
CHIPSET_DAT = 2870
endif
#endif  // RT2070 //

#ifdef RT3070
ifeq ($(CHIPSET),3070)
WFLAGS +=-DRTMP_MAC_USB -DRT30xx -DRT3070 -DRTMP_USB_SUPPORT -DRTMP_TIMER_TASK_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT -DSPECIFIC_VCORECAL_SUPPORT
CHIPSET_DAT = 2870
endif
#endif // RT3070 //

#ifdef RT2880
ifeq ($(CHIPSET),2880)
WFLAGS += -DRT2880 -DRT28xx -DRTMP_MAC_PCI -DCONFIG_RALINK_RT2880_MP -DRTMP_RBUS_SUPPORT -DMERGE_ARCH_TEAM -DA_BAND_SUPPORT -DCONFIG_SWMCU_SUPPORT
ifeq ($(HAS_DFS_SUPPORT),y)
WFLAGS += -DDFS_HARDWARE_SUPPORT -DDFS_FCC_BW40_FIX -DDFS_DEBUG
endif
ifeq ($(HAS_WIFI_LED_SHARE), y)
WFLAGS += -DCONFIG_WIFI_LED_SHARE
endif
endif
#endif // RT2880 //

#ifdef RT2870
ifeq ($(CHIPSET),3572)
WFLAGS +=-DRTMP_MAC_USB -DRTMP_USB_SUPPORT -DRT2870 -DRT28xx -DRT30xx -DRT35xx -DRTMP_TIMER_TASK_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT
endif
#endif // RT2870 //

#ifdef RT3050
ifeq ($(CHIPSET),3050)
WFLAGS +=-DRTMP_RBUS_SUPPORT -DRTMP_MAC_PCI -DRTMP_RF_RW_SUPPORT -DRT305x -DRT3050 -DCONFIG_SWMCU_SUPPORT
endif
#endif // RT3050 //

#ifdef RT3052
ifeq ($(CHIPSET),3052)
WFLAGS +=-DRTMP_RBUS_SUPPORT -DRTMP_MAC_PCI -DRTMP_RF_RW_SUPPORT -DRT305x -DRT3052 -DCONFIG_SWMCU_SUPPORT -DVCORECAL_SUPPORT
endif
#endif // RT3052 //

#ifdef RT2860
ifeq ($(CHIPSET),3062)
WFLAGS +=-DRTMP_MAC_PCI -DRT2860 -DRT28xx -DRT30xx -DRT35xx -DRTMP_PCI_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT
endif
#endif // RT2860 //

#ifdef RT3350
ifeq ($(CHIPSET),3350)
WFLAGS +=-DRTMP_RBUS_SUPPORT -DRTMP_MAC_PCI -DRTMP_RF_RW_SUPPORT -DRT305x -DRT3050 -DRT3350 -DRTMP_INTERNAL_TX_ALC -DSPECIFIC_BCN_BUF_SUPPORT -DCONFIG_SWMCU_SUPPORT
endif
#endif // RT3350 //

#ifdef RT3352
ifeq ($(CHIPSET),3352)
WFLAGS += -DRTMP_MAC_PCI -DRTMP_RBUS_SUPPORT -DRT3352 -DRT305x -DRTMP_RF_RW_SUPPORT -DSPECIFIC_BCN_BUF_SUPPORT -DVCORECAL_SUPPORT -DCONFIG_SWMCU_SUPPORT -DRTMP_INTERNAL_TX_ALC
endif
#endif // RT3352 //

#ifdef RT2860
ifeq ($(CHIPSET),3562)
WFLAGS +=-DRTMP_MAC_PCI -DRT2860 -DRT28xx -DRT30xx -DRT35xx -DRTMP_PCI_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT
endif
#endif // RT2860 //

#ifdef RT5350
ifeq ($(CHIPSET), 5350)
WFLAGS += -DRTMP_MAC_PCI -DRTMP_RBUS_SUPPORT -DRT5350 -DRT305x -DRT3050 -DRT3350 -DRTMP_RF_RW_SUPPORT -DSPECIFIC_BCN_BUF_SUPPORT -DVCORECAL_SUPPORT -DCONFIG_SWMCU_SUPPORT -DRTMP_INTERNAL_TX_ALC -DRTMP_FREQ_CALIBRATION_SUPPORT -DIQ_CAL_SUPPORT -DHW_ANTENNA_DIVERSITY_SUPPORT -DRALINK_GPIO_LED_LOW_ACT
CHIPSET_DAT = 2860
ifeq ($(HAS_WIFI_LED_SHARE), y)
WFLAGS += -DCONFIG_WIFI_LED_SHARE
endif
endif
#endif // RT5350 //

#ifdef RT2870
ifeq ($(CHIPSET),USB_COMBO)
WFLAGS +=-DRTMP_MAC_USB -DRTMP_USB_SUPPORT -DRT2870 -DRT28xx -DRT3070 -DRT2070 -DRT30xx -DRT35xx -DRTMP_TIMER_TASK_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT
endif
#endif // RT2870 //

#ifdef RT30xx
ifeq ($(CHIPSET),3390)
WFLAGS +=-DRTMP_MAC_PCI -DRT30xx -DRT33xx  -DRTMP_PCI_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT -DRT3390
endif

ifeq ($(CHIPSET),3370)
WFLAGS +=-DRTMP_MAC_USB -DRT30xx -DRT33xx -DRTMP_USB_SUPPORT -DRTMP_RF_RW_SUPPORT -DRTMP_EFUSE_SUPPORT -DRT3370 -DRTMP_TIMER_TASK_SUPPORT
endif
#endif // RT30xx //
#################################################


ifeq ($(HAS_BLOCK_NET_IF),y)
WFLAGS += -DBLOCK_NET_IF
endif

ifeq ($(HAS_DFS_SUPPORT),y)
WFLAGS += -DDFS_SUPPORT
endif

ifeq ($(HAS_LLTD),y)
WFLAGS += -DLLTD_SUPPORT
endif

ifeq ($(PLATFORM),RALINK_3050)
WFLAGS += -DRALINK_3052
endif


